home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / gem / l_1199 / 1111 < prev    next >
Internet Message Format  |  1994-08-27  |  4KB

  1. Date: Fri, 29 Jul 1994 00:46:13 -0400 (EDT)
  2. From: Timothy Miller <millert@cs.csee.usf.edu>
  3. Subject: Amodal Dialogs
  4. To: gem-list@world.std.com
  5. In-Reply-To: <memo.804849@cix.compulink.co.uk>
  6. Message-Id: <Pine.3.87.9407290013.C17722-0100000@grad>
  7. Mime-Version: 1.0
  8. Precedence: bulk
  9.  
  10.  
  11. Hollis:
  12.  
  13. ]Whoever (Gee, I like anonymous messages):
  14. ]-----------------------------------------
  15. ]> No, it is NOT that simple.  When you click to top a window, the message
  16. ]> does not get sent until you let go of the button.  You can hold the
  17. ]> button all day, and the window won't get topped until you let go of the
  18. ]> button.
  19. ]
  20. ]Have you even TRIED doing what I've proposed?  Sure, the message may not
  21. ]be sent until you let go of the mouse button, but you can surely trap it.
  22. ]Have you *tried* doing this?
  23. ]
  24. ]Oh, and I hate to tell you...  *YES IT IS THAT SIMPLE*
  25.  
  26. YES!  I have tried it!  I've been doing it ever since the first time 
  27. someone mentioned this as a technique for taking clicks for background 
  28. windows.
  29.  
  30. And I very much like to tell you:  *NO IT IS NOT THAT SIMPLE*
  31.  
  32. And here's why.....
  33.  
  34.  
  35. To everyone:
  36.  
  37. I figured out how to do drags and the like for background windows, and 
  38. I'm surprised I didn't think of it earlier.  Earlier today, I made the 
  39. above comment about the WM_TOPPED event not getting to the window until 
  40. after the button is released.  This is not correct.
  41.  
  42. It appears that evnt_multi will not return to the program for the NEXT 
  43. evnt_multi if the mouse button is still held down -- OR -- event_multi 
  44. will not continue to send WM_TOPPED messages for the window clicked on 
  45. while the button is still held down.
  46.  
  47. Now knowing this, I had a background window that I had flagged as 
  48. untoppable and background active (using flags in my program... I'm using 
  49. regular TOS, so there is no WF_BEVENT).  When the WM_TOPPED message would 
  50. come to my program, I would get the mouse position and pass the correct 
  51. information to the routine that handles mouse events for the dialog.  
  52. This worked fine, except that if I PRESSED the mouse button (rather than 
  53. clicking it), then the program would no longer get any more WM_TOPPED 
  54. messages for that window until I clicked somewhere outside of that window.
  55.  
  56. This frustrated me, so I tried a few solutions.  First, I put a simple 
  57. loop after the mouse-event routine came back to wait until the button was 
  58. let up before returning.  This did not help.
  59.  
  60. Then I tried putting that loop BEFORE the call to the mouse-event 
  61. routine.  This caused clicks to be sent only after the mouse was let up, 
  62. but it solved the problem of the window not getting any more WM_TOPPED 
  63. messages.
  64.  
  65. It was at that point that I realised that if I were to continue to 
  66. simulate mouse events as long as the button was held down, then I 
  67. wouldn't have to worry about evnt_multi not returning... I wouldn't be 
  68. using evnt_multi until after the button had been let up.
  69.  
  70. This worked great.  I could drag sliders and everything.
  71.  
  72. But there is a problem with form_button and objects marked as 
  73. selectable.  As you know, when a selectable button is clicked, 
  74. form_button does not return until the button is let up.  What I want to 
  75. know is how is the use of form_button when a button is PRESSED (not 
  76. simply clicked) preventing further WM_TOPPED messages from being sent to 
  77. my application for that window, and how do I solve this problem?
  78.  
  79. Everything would be just dandy if something weren't preventing these 
  80. WM_TOPPED messages from being sent.  Other messages seem to get sent just 
  81. fine, and the problem clears up if I click anywhere outside of the window 
  82. in question... until I press a button again.
  83.  
  84.  
  85. Ta.
  86.  
  87.  
  88.